<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />

    <script src="https://cdn.staticfile.org/vue/3.3.4/vue.global.min.js"></script>
    <!-- import CSS -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/element-plus/2.3.14/theme-chalk/index.min.css">
    <!-- import JavaScript -->
    <script src="https://cdn.staticfile.org/element-plus/2.3.14/index.full.min.js"></script>
</head>
<body>
<div id="app">
    <el-button :plain="true" @click="open2">success</el-button>
    <el-button :plain="true" @click="open3">warning</el-button>
    <el-button :plain="true" @click="open1">message</el-button>
    <el-button :plain="true" @click="open4">error</el-button>
</div>
<script>



  let app = Vue.createApp({
        data() {
            return {
                message: "Hello Element Plus",
            };
        },
      methods: {
          open1() {
              // this.$message('这是一条消息提示');
              ElMessage('this is a message.');
          },
          open2() {
              this.$message({
                  message: '恭喜你，这是一条成功消息',
                  type: 'success'
              });
          },

          open3() {
              this.$message({
                  message: '警告哦，这是一条警告消息',
                  type: 'warning'
              });
          },

          open4() {
              this.$message.error('错了哦，这是一条错误消息');
          }
      }
    });

  app.use(ElementPlus).mount("#app");
</script>
</body>
</html>